﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Devsoft.Utilities.Extentions
{
    public static class FunctionExtension
    {

        public static T Or<T>(this Func<T> func, T defVal)
        {
            try
            {
                return func();
            }
            catch (Exception)
            {
                return defVal;
            }
        }

    }
}
